home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CoolWB / Icons / Other / RareDiamonds / DoIcon12 / Install-DoIcon < prev    next >
Text File  |  1994-11-12  |  5KB  |  225 lines

  1. ; $VER: DoIcon-Install 1.2 (12.11.94)
  2. ; Install script for DoIcon © 1994 by Lars 'SFX' Eilebrecht
  3.  
  4. (set app_name "DoIcon")
  5.  
  6. (set version "1.2")
  7.  
  8. (set vers_name (cat app_name " v" version))
  9.  
  10. (set bad-kick "You must be using Kickstart 2.04+ to install DoIcon")
  11.  
  12. (set install-msg
  13.   (cat
  14.     "\n\nWelcome to the DoIcon installation utility.\n\n"
  15.     "This program lets you install DoIcon on your Amiga.\n\n"
  16.     "Please read the documentation befor using DoIcon.\n\n"
  17.     "© 1994 by Lars Eilebrecht."
  18.   )
  19. )
  20.  
  21. (set exit_msg "\nDon't forget to read the documentation!\n\nHave a nice day...")
  22.  
  23. (set copying "Copying ")
  24.  
  25. (set were-doicon "Where would you like to install the Doicon-executable?")
  26.  
  27. (set help-were-doicon "You should place DoIcon in an directory which is in your search path, C: for example.")
  28.  
  29. (set install-guide "Would you like to install any DoIcon guides?")
  30.  
  31. (set help-were-guide
  32.   (cat
  33.     "    DoIcon.guide is the documentation for DoIcon in the special "
  34.     "AmigaGuide® hypertext format. You need a program like AmigaGuide or "
  35.     "MultiView to view it properly."
  36.   )
  37. )
  38.  
  39. (set which-guides "\n Which guides should be installed?")
  40.  
  41. (set which-language "\nWhich languages should be installed?")
  42.  
  43. (set which-language-help
  44.   (cat
  45.     "    The Amiga can be operated in many different languages. If you "
  46.     "want DoIcon to use the same language as the Amiga Workbench "
  47.     "then a catalog file must be copied to your harddisk for each "
  48.     "language supported.\n"
  49.     "    To reduce the amount of space consumed by the language files, "
  50.     "you can select to have only the files of specific languages "
  51.     "copied.\n"
  52.     "    Simply check the boxes of the languages you wish to have "
  53.     "available on your system.\n"
  54.     "(Please note that the english language is builtin) "
  55.   )
  56. )
  57.  
  58. (transcript (cat "Installing " vers_name " ..."))
  59.  
  60. ; Check Kickstart version. Exit if not at least 2.0
  61.  
  62. (if (< (/ (getversion) 65536) 37)
  63.   (abort bad-kick)
  64. )
  65.  
  66. (message install-msg)
  67.  
  68. (complete 0)
  69.  
  70. ; Copy DoIcon
  71.  
  72. (set destination
  73.   (askdir
  74.     (prompt  were-doicon)
  75.     (help    (cat help-were-doicon "\n\n" @askdir-help))
  76.     (default "c:")
  77.   )
  78. )
  79.  
  80. (set @default-dest destination)
  81.  
  82. (copyfiles
  83.   (prompt "Copying DoIcon...")
  84.   (confirm)
  85.   (source app_name)
  86.   (dest destination)
  87.   (help @copyfiles-help)
  88. )
  89.  
  90. (complete 30)
  91.  
  92. ; Copy guide
  93.  
  94. (if
  95.   (askbool
  96.     (prompt (cat "\n" install-guide))
  97.     (help   help-were-guide)
  98.   )
  99.  
  100.   (
  101.  
  102.     (set guidelang
  103.       (askoptions
  104.         (prompt which-guides)
  105.         (help   (cat help-were-guide "\n\n\n" @askoptions-help))
  106.         (choices
  107.           "Deutsch"
  108.           "English"
  109.         )
  110.         (default "English")
  111.       )
  112.     )
  113.   
  114.     (set n 0)
  115.  
  116.     (while
  117.       (set language
  118.         (select n
  119.           "Deutsch"
  120.           "English"
  121.           ""
  122.         )
  123.       )
  124.  
  125.       (if (IN guidelang n)
  126.             (
  127.  
  128.      (set destination
  129.       (askdir
  130.         (prompt  (cat "Select a place for the following guide: " language))
  131.         (help    (cat help-were-guide "\n\n" @askdir-help))
  132.         (default "Help:")
  133.       )
  134.     )
  135.  
  136.               (set guidesource (cat "Docs/" language  "/DoIcon.guide"))
  137.  
  138.               (set guidedestination destination)
  139.  
  140.               (if (exists guidesource)
  141.                 (
  142.                   (copyfiles
  143.                     (prompt (cat copying "DoIcon.guide..."))
  144.                     (confirm)
  145.                     (source guidesource)
  146.                     (dest guidedestination)
  147.                     (infos)
  148.                     (help @copyfiles-help)
  149.                   )
  150.                 )
  151.               )
  152.             )
  153.           )
  154.  
  155.         (set n (+ n 1))
  156.       )
  157.     )
  158. )
  159.  
  160. (complete 70)
  161.  
  162. ; Copy catalog files
  163.  
  164. (if (= (exists "Locale:") 2)
  165.   (
  166.     (set lang
  167.       (askoptions
  168.         (prompt which-language)
  169.         (help   (cat which-language-help "\n\n" @askoptions-help))
  170.         (choices
  171.           "English"
  172.           "Deutsch"
  173.           "Suomi"
  174.         )
  175.         (default 1)
  176.       )
  177.     )
  178.  
  179.  
  180.     (set n 0)
  181.  
  182.     (while
  183.       (set language
  184.         (select n
  185.           "English"
  186.           "Deutsch"
  187.           "Suomi"
  188.           ""
  189.         )
  190.       )
  191.  
  192.       (
  193.         (if (IN lang n)
  194.           (if (<> 0 n)   ; skip english
  195.             (
  196.               (set catalogs (tackon "Locale" language))
  197.  
  198.               (set destination (tackon "Locale:Catalogs" language))
  199.  
  200.               (if (exists (tackon catalogs "DoIcon.catalog"))
  201.                 (copyfiles
  202.                   (prompt "Copying catalogs...")
  203.                   (confirm)
  204.                   (source (tackon catalogs "DoIcon.catalog"))
  205.                   (dest destination)
  206.                   (help @copyfiles-help)
  207.                 )
  208.               )
  209.  
  210.             )
  211.           )
  212.         )
  213.  
  214.       )
  215.       (set n (+ n 1))
  216.     )
  217.   )
  218. )
  219.  
  220. (complete 100)
  221.  
  222. (exit exit_msg)
  223.  
  224. ; End of Installer script
  225.